#ifndef __utilityH
#define __utilityH

#include "MathLib.h"

using namespace math;

class Primitive;

struct CollisionInfo
{
	CollisionInfo() 
	: pObject(0)
	, insideSphere(0)
	, distance(100000.0f)
	, planeDotProduct(0)
	{}
	Primitive*		pObject;
	math::Vertex	vIntersectPt;
	int				insideSphere;
	flt				distance;
	flt				planeDotProduct;
};


class Colour
{
	public:
	
	Colour() :
		R(0.0),
		G(0.0),
		B(0.0)
	{} 
	Colour(flt p_fR, flt p_fG, flt p_fB)
	: R(p_fR)
	, G(p_fG)
	, B(p_fB)
	{}	
	Colour& operator*=(const flt mult) 
	{
		this->R *= mult;
		this->G *= mult;
		this->B *= mult;
		return *this; 	
	}
	const Colour operator*(const flt mult) const
	{
		Colour result = *this;    
		result*= mult;            
		return result;      
	}

	Colour& operator+=(const Colour add) 
	{
		this->R += add.R;
		this->G += add.G;
		this->B += add.B;
		return *this; 	
	}
	const Colour operator+(const Colour add) const
	{
		Colour result = *this;    
		result += add;            
		return result;      
	}

	flt R, G, B;
};

typedef flt Pics;


struct Samples
{
	Vector rays[5];
};





#endif
